<h1>Listing pages</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Content</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @pages.each do |page| %>
  <tr>
    <td><%= page.title %></td>
    <td><%= page.content %></td>
    <td><%= link_to 'Show', page %></td>
    <td><%= link_to 'Edit', edit_page_path(page) %></td>
    <td><%= link_to 'Destroy', page, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Page', new_page_path %>
